﻿<UserControl x:Class="LongBar.LibraryItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="220" Height="60"  Margin="5">
    <UserControl.Triggers>
        <!--<EventTrigger RoutedEvent="UserControl.Loaded">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.4"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>-->
        <EventTrigger RoutedEvent="UserControl.MouseEnter">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Bg2" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.15"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
        <EventTrigger RoutedEvent="UserControl.MouseLeave">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Bg2" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </UserControl.Triggers>
    <Grid>
        <Rectangle Name="Bg2" Stroke="#B8D6FB" RadiusX="4" RadiusY="4" Opacity="0">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#11FAFBFD" Offset="0"/>
                    <GradientStop Color="#B2EBF3FD" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle Name="Bg1" Stroke="#B8D6FB" RadiusX="4" RadiusY="4" Opacity="0">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#B2DCEBFC" Offset="0"/>
                    <GradientStop Color="#7FC1DBFC" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <DockPanel>
            <Image Margin="5" Name="ItemIconImage" Source="/LongBar;component/Resources/Tile_icon.png" />
            <StackPanel DockPanel.Dock="Right" VerticalAlignment="Center">
                <TextBlock Name="ItemTitleTextBlock" Text="Tile Name" TextAlignment="Left" TextTrimming="CharacterEllipsis" />
                <TextBlock Name="ItemDeveloperTextBlock" Text="Tile Developer" TextAlignment="Left" TextTrimming="CharacterEllipsis" Foreground="Gray"/>
            </StackPanel>
        </DockPanel>
    </Grid>
</UserControl>
